import { NestFactory } from '@nestjs/core';
import { SwaggerModule , DocumentBuilder } from '@nestjs/swagger'
import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule,{
    logger:false
  });

  app.enableCors();

  const options = new DocumentBuilder()
    .setTitle('博客Api')
    .setDescription('所有Api')                                  
    .setVersion('1.0')
    .build(); 
  const document = SwaggerModule.createDocument(app, options);
  SwaggerModule.setup('Api', app, document);

  await app.listen(5000);
}
bootstrap();
